package dbms.ypr;

import java.util.Scanner;

public class Input {
//输入命令
    public static void get(){
        Scanner scanner = new Scanner(System.in);
        String input = "";
        do{
            System.out.print(">>");
            input += " " + scanner.nextLine();
            input = input.replaceFirst("(\\s+)$", "");
            //System.out.println(input);
        }while(!input.endsWith(";"));

        //System.out.println(input);
        //格式化字符串
        String sql = Format.sqlFromat(input);
        //System.out.println(sql);
        //System.out.println("----------");
        dbms.ypr.SqlAnalysis.analysis(sql);
    }
}
